package edu.qichen.onlineBlog.framework.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum ErrorCodeEnum {
    COMMON_ERROR(1000, "通用错误"),
    AUTH_ERROR(401, "未登录或者登录信息已失效，请重新登录"),
    SYSTEM_ERROR(500, "系统错误"),
    SERVER_REQUEST_ERROR(100031, "请求参数不合法"),
    EMAIL_FORMAT_ERROR(100001, "无效的邮箱地址，缺少'@'符号"),
    EMAIL_EXIST_ERROR(100002, "该邮箱已被注册"),
    EMAIL_OR_CODE_ERROR(100003, "邮箱或者验证码输入不合法"),
    OLD_NEW_EQUALS(100005, "新密码与旧密码不能相同"),
    CODE_EQ_ERROR(100004, "邮箱或者验证码输入不合法"),
    CODE_NOT_EMPTY(100006, "已经获取过验证码，请五分钟后再试"),
    USERNAME_EXIST_ERROR(100007, "该用户名已被注册"),
    USERNAME_REPEAT_ERROR(100009, "存在重复的用户名"),
    EMAIL_REPEAT_ERROR(100010, "存在重复的邮箱"),
    SERVER_UPDATE_QUERY_ERROR(100021, "更新成功，但获取更新后的数据失败"),
    USERNAME_OR_PASSWORD_NULL_ERROR(100023, "账户或者密码不存在"),
    USERNAME_OR_PASSWORD_EQ_ERROR(100024, "账户或者密码错误"),
    CURRENT_LOGIN_USER(100025, "不能删除登录的用户"),
    FILE_UPLOAD_ERROR(400001, "文件上传失败"),
    ;

    private final Integer errCode;
    private final String errMsg;
}
